<?php
/*
 * @Description: 入口文件
 * @Author: Zhy
 * @Date: 2024-06-13 09:11:00
 * @LastEditTime: 2024-06-18 15:29:17
 * @LastEditors: Zhy
 */

// 加载项目初始化文件
include './init.php';

session_start();
if (isset($_COOKIE["user_id"])) {
    include DIR_CORE."/MySQLDB.php";
    $user_id = $_COOKIE["user_id"];
    $sql = "SELECT * from user where user_id = $user_id";
    $result = my_query($sql);
    $row = mysql_fetch_assoc($result); /* 获取用户信息 */
    $_SESSION["userInfo"] = $row;
}

// 加载视图文件
include DIR_VIEW."/index.html";

?>
